import request from '@/utils/request'
//列表
export function list(params) {
  return request({
    url: "/account/deviceInfo/getDeviceInfoList",
    method: 'get',
    params
  })
}
//新增
export function add(data) {
  return request({
    url: "/account/deviceInfo/updateDeviceInfo",
    method: "post",
    data
  })
}
//查看
export function detail(id) {
  return request({
    url: "/auth/sysMsg/detail/" + id,
    method: "post"
  })
}


//调拨、状态变更、归库
export function changeStatus(data) {
  return request({
    url: "/account/deviceInfo/init",
    method: "post",
    data
  })
}

// 查询机构
export function getOrganization() {
  return request({
    url: "/auth/org/orgAccListTree",
    method: "post"
  })
}
export function getUser(id) {
  return request({
    url: "/auth/org/accListByOrgId/"+id,
    method: "post"
  })
}

// 设备信息
export function getGridList(data) {
  return request({
    url: "/account/deviceInfo/selectDeviceInfoList",
    method: "post",
    data
  })
}
//浙江省市县接口
export function getCity(data) {
  return request({
    url: "/area/city/330000",
    method: "get",
  })
}
export function getCounty(id) {
  return request({
    url: `/area/region/${id}`,
    method: "get",
	// params
  })
}